<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$mainframe->addCustomHeadTag('<script type="text/javascript" src="components/com_joomleague/js/301a.js"></script>');
/* JoomLeague League Management and Prediction Game for Joomla!
 * Copyright (C) 2007  Robert Moss
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
<script language="javascript" type="text/javascript" src="<?=$mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
<style>

.CODE { font-family: Courier New, Monospace; font-size:12px; font-weight:500; font-style:normal; text-decoration:none; font-variant:normal; color: #006F37; background: #FFFFF0; border: 1px dashed #008000; padding: 8px;}
p.imp{color:crimson;font-weight:bold;}
tr.rola{background-color:white;}
td.rolb{cursor:pointer;text-align:center;border:dashed 1px white;background-color:white;}
</style>
		<script language="javascript" type="text/javascript">
		<!--
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			// do field validation
			if ( form.name.value == "" ) {
				alert( "<?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JS_CHECK1;?>" );
			} else if ( form.league_id.value == 0 && form.leagueNew.value == "") {
				alert( "<?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JS_CHECK2;?>" );
			} else if ( form.season_id.value == 0 && form.seasonNew.value == "") {
				alert( "<?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JS_CHECK3;?>" );
			} else if ( form.joomleague_admin.value == 0 ) {
				alert( "<?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JS_CHECK4;?>" );	
			} else if ( form.joomleague_editor.value == 0 ) {
				alert( "<?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JS_CHECK5;?>" );
			} else if ( form.current_round.value == 0 ) {
				alert( "<?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JS_CHECK6;?>" );        	        	        				
			} else {
				submitform( pressbutton );
			}
		}
		//-->
		</script>

<form action="index2.php" method="post" name="adminForm">
<div id="right">
	<div id="rightpad">
	
<!-- Header START -->		
		<div id="step">
			<div class="t">
        <div class="t">
          <div class="t"></div>
        </div>
      </div>
      <div class="m" align="left">
				<div class="far-right">
							<div class="button1-left"><div class="help"><a href="http://www.joomleague.de/handbuch.html" alt="<?php echo _JL_ADMIN_MANUAL;?>" title="<?php echo _JL_ADMIN_MANUAL;?>" target="blank"><?php echo _JL_ADMIN_MANUAL;?></a></div></div>
							<div class="button1-left"><div class="forum"><a href="http://www.joomleague.de/forum/" alt="<?php echo _JL_ADMIN_FORUM;?>" title="<?php echo _JL_ADMIN_FORUM;?>" target="blank"><?php echo _JL_ADMIN_FORUM;?></a></div></div>
							<div class="button1-left"><div class="about"><a href="http://www.joomleague.de" alt="<?php echo _JL_ADMIN_INFO;?>" title="<?php echo _JL_ADMIN_INFO;?>" target="blank"><?php echo _JL_ADMIN_INFO;?></a></div></div>
				</div>
				<div class="button1-left"><div class="blank"><a href="index2.php?option=com_joomleague"></a></div></div><span class="step"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_FORM_PROJECTS;?></span>
			</div>
      <div class="b">
        <div class="b">
          <div class="b"></div>
        </div>
      </div>
    </div>
<!-- Header END -->     

    <div id="installer">

<!-- Title 1 START --> 
			<div class="t">
        <div class="t">
          <div class="t"></div>
        </div>
      </div>
      <div class="m" align="left">
				<h2><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TITLE1;?></h2>
<!-- Titel 1 END -->

<!-- Content 1 START -->		
				<div class="install-text">
	<table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
		<tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_NAME;?></td>
			<td><input class="inputbox" type="text" size="25" name="name" value="<?php echo $proj->name; ?>"></td>
		</tr>    
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_LEAGUE;?></td>
			<td><?php echo $league_list; ?><?php if (isset($old_id)) { ?><br><input type="checkbox" name="newLeagueCheck" value="1"
		onclick="if(this.checked){document.forms[0].league_id.disabled=true;document.forms[0].leagueNew.disabled=false;document.forms[0].leagueNew.value=document.forms[0].name.value} 
		else {document.forms[0].league_id.disabled=false;document.forms[0].leagueNew.disabled=true}"><? echo _JL_ADMIN_EDIT_LIST_LMO_IMPORT_CREATE;?>
		<input type="text" name="leagueNew" id='leagueNew' size="16" disabled><?php } ?></td>
		</tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_SEASON;?></td>
			<td><?php echo $season_list; ?><?php if (isset($old_id)) { ?><br><input type="checkbox" name="newSeasonCheck" value="1"
		onclick="if(this.checked){document.forms[0].season_id.disabled=true;document.forms[0].seasonNew.disabled=false} 
		else {document.forms[0].season_id.disabled=false;document.forms[0].seasonNew.disabled=true}"><? echo _JL_ADMIN_EDIT_LIST_LMO_IMPORT_CREATE;?>
		<input type="text" name="seasonNew" id='seasonNew' disabled><?php } ?></td>
		</tr>
		
		<!--import existing project settings -->
		<?php
    if ($task == 'new') {
    ?>
  		<tr><td><? echo _JL_ADMIN_EDIT_LIST_JL_IMPORT_USE_PROJECT_TEMPLATE; ?></td>
  		<td><select name='copyTemplate' id='copyTemplate'>
  		<option value="0" selected>New templates</option>
  		<?
  		$query = "SELECT name, id FROM #__joomleague ORDER BY name";
  		$database->setQuery($query);
  		$rows = $database->loadObjectList();
  		foreach ($rows AS $row)
  		{
  			echo "<option value='". $row->id ."'>". $row->name ."</option>\n";
  		}
  		?> 
  		</select></td></tr>
  		<?php
    }
		?> 
		
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_ADMIN;?></td>
			<td><?php echo $user_list; ?></td>
		</tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_EDITOR;?></td>
			<td><?php echo $editor_list; ?></td>
		</tr>

<script language="javascript" type="text/javascript">
    function FormSwitch(action) {
		document.adminForm.current_round.readOnly=action;
    }
    function FormSwitch1(action) {
		document.adminForm.auto_time.disabled=action;		
    }
</script>
	     			
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_CURRENT_ROUND_AUTO;?></td>    
	    <td><input type="radio" name="current_round_auto" id="current_round_auto0" value="0" <?php if ($proj->current_round_auto==0) echo 'checked="checked"' ?> onclick="javascript:FormSwitch(false) & FormSwitch1(true)" >
			<label for="current_round_auto0"><?php echo _CMN_NO ?></label>
			<input type="radio" name="current_round_auto" id="current_round_auto1" value="1" <?php if ($proj->current_round_auto==1) echo 'checked="checked"' ?> onclick="javascript:FormSwitch(true) & FormSwitch1(false)" />
			<label for="current_round_auto1"><?php echo _CMN_YES ?></label>
    	</td>
    <tr>      		
    <tr>
			<td align="right" width="50%"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_CURRENT_ROUND;?></td>
			<td><input class="inputbox" type="text" size="5" name="current_round" value="<?php echo $proj->current_round; ?>" <?php if ($proj->current_round_auto == 1) echo 'READONLY' ?> </td>
		</tr>	
    <tr>
			<td align="right" width="50%"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_CURRENT_ROUND_AUTO_TIME;?></td>
			<td><input class="inputbox" type="text" size="5" name="auto_time" value="<?php echo $proj->auto_time; ?>" <?php if ($proj->current_round_auto == 0) echo 'DISABLED' ?> >&nbsp;min.</td>
		</tr>  
<?php

    if ($fireboard_list){;?>      
		<tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JB_LINK;?></td>
	    <td align="left"><?php echo mosHTML::yesnoRadioList('enable_sb', '', $proj->enable_sb );?></td>
	    <td>&nbsp;</td>
    </tr>
    <tr>
			<td align="right" width="50%"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_JB_ID;?></td>
			<td><?php echo $fireboard_list; ?></td>
		</tr>    
<?php };?>	
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TEMPLATE;?></td>
			<td><?php echo $folder_list; ?></td>
		</tr>
<?php
	$timeoffset = array(
		mosHTML::makeOption( '-12:00', '-12:00'),
		mosHTML::makeOption( '-11:00', '-11:00'),
		mosHTML::makeOption( '-10:00', '-10:00'),
		mosHTML::makeOption( '-9:30', '-09:30'),
		mosHTML::makeOption( '-9:00', '-09:00'),
		mosHTML::makeOption( '-8:00', '-08:00'),
		mosHTML::makeOption( '-7:00', '-07:00'),
		mosHTML::makeOption( '-6:00', '-06:00'),
		mosHTML::makeOption( '-5:00', '-05:00'),
		mosHTML::makeOption( '-4:00', '-04:00'),
		mosHTML::makeOption( '-3:30', '-03:30'),
		mosHTML::makeOption( '-3:00', '-03:00'),
		mosHTML::makeOption( '-02:00', '-02:00'),
		mosHTML::makeOption( '-1:00', '-01:00'),
		mosHTML::makeOption( '0:00', '00:00'),
		mosHTML::makeOption( '1:00' , '+01:00'),
		mosHTML::makeOption( '2:00', '+02:00'),
		mosHTML::makeOption( '3:00', '+03:00'),
		mosHTML::makeOption( '3:30', '+03:30'),
		mosHTML::makeOption( '4:00', '+04:00'),
		mosHTML::makeOption( '4:30', '+04:30'),
		mosHTML::makeOption( '5:00', '+05:00'),
		mosHTML::makeOption( '5:30', '+05:30'),
		mosHTML::makeOption( '5:45', '+05:45'),
		mosHTML::makeOption( '6:00', '+06:00'),
		mosHTML::makeOption( '6:30', '+06:30'),
		mosHTML::makeOption( '7:00', '+07:00'),
		mosHTML::makeOption( '8:00', '+08:00'),
		mosHTML::makeOption( '8:45', '+08:45'),
		mosHTML::makeOption( '9:00', '+09:00'),
		mosHTML::makeOption( '9:30', '+09:30'),
		mosHTML::makeOption( '10:00', '+10:00'),
		mosHTML::makeOption( '10:30', '+10:30'),
		mosHTML::makeOption( '11:00', '+11:00'),
		mosHTML::makeOption( '11:30', '+11:30'),
		mosHTML::makeOption( '12:00', '+12:00'),
		mosHTML::makeOption( '12:45', '+12:45'),
		mosHTML::makeOption( '13:00', '+13:00'),
		mosHTML::makeOption( '14:00', '+14:00'),
	);
	$projecttype = array (
    mosHTML::makeOption( 'SIMPLE_LEAGUE', _JL_ADMIN_EDIT_FORM_PROJECTS_TYPE_SIMPLE_LEAGUE),
    mosHTML::makeOption( 'DIVISIONS_LEAGUE', _JL_ADMIN_EDIT_FORM_PROJECTS_TYPE_DIVISIONS_LEAGUE),
    mosHTML::makeOption( 'SIMPLE_KO', _JL_ADMIN_EDIT_FORM_PROJECTS_TYPE_SIMPLE_KO),
    //mosHTML::makeOption( 'TURNAMENT_MODE', _JL_ADMIN_EDIT_FORM_PROJECTS_TYPE_TURNAMENT_MODE)
  );
?>    
		<tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_OFFSET;?></td>
	    <td align="left"><?php echo mosHTML::selectList( $timeoffset, 'serveroffset', 'size="1" class="inputbox"', 'value', 'text', $proj->serveroffset );?></td>
      <td>&nbsp;</td>
    </tr> 
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TYPE;?></td>
	    <td align="left"><?php echo mosHTML::selectList( $projecttype, 'project_type', 'size="1" class="inputbox"', 'value', 'text', $proj->project_type );?></td>
      <td>&nbsp;</td>
    </tr>	
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TEAMS_AS_REFEREES;?></td>
	    <td align="left"><?php echo mosHTML::yesnoRadioList('teams_as_referees', '', $proj->teams_as_referees );?></td>
      <td>&nbsp;</td>
    </tr>		    			
  	<tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_PUBLISHED;?></td>
	    <td align="left"><?php echo mosHTML::yesnoRadioList('published', '', $proj->published );?></td>
      <td>&nbsp;</td>
    </tr>		
   </table>
				</div>
<!-- Content 1 END -->

<!-- Info 1 START -->				
				<div class="install-body">
    			<div class="t">
            <div class="t">
              <div class="t"></div>
            </div>
          </div>
          <div class="m">
						<fieldset>
							<table class="content">
							<tr>
								<td><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_HINT1;?>
								<?php if ($fireboard_list){;?>  
                <?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_FIREBOARD_HINT;?><a href="http://www.joomleague.de/forum/index.php/topic,860.0.html" target="_blank">JoomLeague & Fireboard</a><br /><br />
								<?php };?>
                <?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_HINT_NEEDED;?>
                </td>
							</tr>
							</table>
						</fieldset>
					</div>
          <div class="b">
            <div class="b">
              <div class="b"></div>
            </div>
          </div>
					<div class="clr"></div>
				</div>
<!-- Info 1 END -->

<!-- Title 2 START -->				
        <div class="newsection"></div>
				<h2><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TITLE2;?></h2>
<!-- Titel 2 END -->

<!-- Content 2 START -->				
				<div class="install-text">
   <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_REGULAR;?></td>
			<td><input class="inputbox" type="text" size="5" name="game_regular_time" value="<?php echo $proj->game_regular_time; ?>"></td>
		  <td align="left">&nbsp;</td>
    </tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_PARTS;?></td>
			<td><input class="inputbox" type="text" size="5" name="game_parts" value="<?php echo $proj->game_parts; ?>"></td>
		  <td align="left">&nbsp;</td>
    </tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_HALFTIME;?></td>
			<td><input class="inputbox" type="text" size="5" name="halftime" value="<?php echo $proj->halftime; ?>"></td>
		  <td align="left">&nbsp;</td>
    </tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_REGULAR_POINTS;?></td>
			<td><input class="inputbox" type="text" size="10" name="points_after_regular_time" value="<?php echo $proj->points_after_regular_time; ?>"></td>
		  <td align="left">&nbsp;</td>
    </tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_LEGS;?></td>
	    <td align="left"><?php echo mosHTML::yesnoRadioList('use_legs', '', $proj->use_legs );?></td>
      <td>&nbsp;</td>
    </tr>	    
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_ADD_TIME;?></td>
	    <td align="left"><?php echo mosHTML::yesnoRadioList('allow_add_time', '', $proj->allow_add_time );?></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_ADD_TIME_LENGTH;?></td>
			<td><input class="inputbox" type="text" size="5" name="add_time" value="<?php echo $proj->add_time; ?>"></td>
		  <td align="left">&nbsp;</td>
    </tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_ADD_TIME_POINTS;?></td>
			<td><input class="inputbox" type="text" size="10" name="points_after_add_time" value="<?php echo $proj->points_after_add_time; ?>"></td>
		  <td align="left">&nbsp;</td>
    </tr>
    <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_PENALTY_POINTS;?></td>
			<td><input class="inputbox" type="text" size="10" name="points_after_penalty" value="<?php echo $proj->points_after_penalty; ?>"></td>
		  <td align="left">&nbsp;</td>
    </tr>  
<?php
$allmatch_order = array();
$allmatch_order[] = mosHTML::makeOption( '0', _JL_ASC);
$allmatch_order[] = mosHTML::makeOption( '1', _JL_DESC);
?>
		<tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_ALLMATCH_ORDER;?></td>
	    <td align="left"><?php echo mosHTML::selectList( $allmatch_order, 'allmatch_order', 'size="1" class="inputbox"', 'value', 'text', $proj->allmatch_order );?></td>
      <td>&nbsp;</td>
    </tr>                  
   </table>
				</div>
<!-- Content 2 END -->

<!-- Info 2 START -->				
				<div class="install-body">
    			<div class="t">
            <div class="t">
              <div class="t"></div>
            </div>
          </div>
          <div class="m">
						<fieldset>
							<table class="content">
							<tr><td><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_HINT2;?>
								</td>
							</tr>
							</table>
						</fieldset>
					</div>
          <div class="b">
            <div class="b">
              <div class="b"></div>
            </div>
          </div>
					<div class="clr"></div>
				</div>
<!-- Info 2 END -->


<!-- Title 4 START -->	
        <div class="newsection"></div>
				<h2><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TITLE4;?></h2>
<!-- Title 4 END -->

<!-- Content 4 START -->						
				<div class="install-text">
<?php if(count($team_list) > 0){ ?>
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
    <tr>
      <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_SELECT_FAV_TEAM;?></td>
	    <td><?php echo $team_list; ?></td>
    </tr>
    <tr>
	    <td align="right" width="50%"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_HIGHLIGHT_FAV_TEAM;?></td>
			<td>
			<input class="inputbox" type="text" ID="sample_2" size="1" value="">&nbsp;<input type="text" name="fav_team_color" ID="input_field_2" size="9" value="<?php echo $proj->fav_team_color;?>" class="inputbox">&nbsp;
			<input type="button" class="inputbox" onclick="showColorGrid3('input_field_2','sample_2');return overlib(document.getElementById('colorpicker301').innerHTML, CAPTION,'Farbe:' , BELOW, RIGHT,FOLLOWMOUSE=false, CLOSEBTN=true, CLOSEBTNCOLORS=['white', 'white', 'white', 'white'], STICKY=false);" value="...">
<div id="colorpicker301" class="colorpicker301" style="position:absolute;top:0px;left:0px;z-index:1000;display:none;"></div>
<script>document.getElementById('sample_2').style.backgroundColor=document.getElementById('input_field_2').value;</script>
			</td>
    </tr>
  </table>
  <?php }
        else { ?>
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
    <tr>
	    <td align="center"><br /><br /><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_NO_TEAMS;?></td>
    </tr>
  </table>
  <?php }?>
				</div>
<!-- Content 4 END -->

<!-- Info 4 START -->				
				<div class="install-body">
    			<div class="t">
            <div class="t">
              <div class="t"></div>
            </div>
          </div>
          <div class="m">
						<fieldset>
							<table class="content">
							<tr><td><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_HINT4;?>
								</td>
							</tr>
							</table>
						</fieldset>
					</div>
          <div class="b">
            <div class="b">
              <div class="b"></div>
            </div>
          </div>
					<div class="clr"></div>
				</div>
<!-- Info 4 END -->	

<!-- Title 5 START -->
        <div class="newsection"></div>
				<h2><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TITLE5;?></h2>
<!-- Title 5 END -->

<!-- Content 5 START -->				
				<div class="install-text">
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIPGAME;?></td>
	    <td align="left"><?php echo mosHTML::yesnoRadioList('joomleague_tip', '', $proj->joomleague_tip );?></td>
    </tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIPGAME_AUTO_APPROVE;?></td>
      <td align="left"><?php echo mosHTML::yesnoRadioList( 'auto_approve', '', $proj->auto_approve)?></td>
    </tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_ADMIN;?></td>
      <td align="left"><?php echo $tipadmin_list; ?></td>
    </tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_MODE;?></td>
      <td align="left"><?php echo mosHTML::yesnoSelectList( 'mode', 'class="inputbox" size="1"', $proj->mode , $yes = "Toto", $no="Tipp" )?></td>
    </tr>
<script language="javascript" type="text/javascript">
    function FormSwitchJoker(action) {
		document.adminForm.tip_points_correct_result_joker.disabled=action;
		document.adminForm.tip_points_correct_diff_joker.disabled=action;
		document.adminForm.tip_points_correct_draw_joker.disabled=action;
		document.adminForm.tip_points_correct_tendence_joker.disabled=action;
		document.adminForm.tip_points_tip_joker.disabled=action;
    }
</script>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_JOKER;?></td>
	    <td><input type="radio" name="tip_joker" id="tip_joker0" value="0" <?php if ($proj->tip_joker==0) echo 'checked="checked"' ?>  onclick="javascript:FormSwitchJoker(true)" >
			<label for="tip_joker0"><?php echo _CMN_NO ?></label>
			<input type="radio" name="tip_joker" id="tip_joker1" value="1" <?php if ($proj->tip_joker==1) echo 'checked="checked"' ?> onclick="javascript:FormSwitchJoker(false)" />
			<label for="tip_joker1"><?php echo _CMN_YES ?></label>
    	</td>
  	</tr>    
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_CALCULATION;?></td>
      <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_WITHOUT_JOKER;?></td>
      <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_WITH_JOKER;?></td>
    </tr>        
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_CORRECT_RESULT;?></td>
      <td align="left"><input type="text" name="tip_points_correct_result" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_result;?>"</td>
      <td align="left"><input type="text" name="tip_points_correct_result_joker" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_result_joker;?>" <?php if ($proj->tip_joker == 0) echo 'DISABLED ' ?>/</td>      
    </tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_CORRECT_DIFF;?></td>
      <td align="left"><input type="text" name="tip_points_correct_diff" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_diff;?>"</td>
      <td align="left"><input type="text" name="tip_points_correct_diff_joker" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_diff_joker;?>" <?php if ($proj->tip_joker == 0) echo 'DISABLED ' ?>/</td>      
    </tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_CORRECT_DRAW;?></td>
      <td align="left"><input type="text" name="tip_points_correct_draw" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_draw;?>"</td>
      <td align="left"><input type="text" name="tip_points_correct_draw_joker" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_draw_joker;?>" <?php if ($proj->tip_joker == 0) echo 'DISABLED ' ?>/</td>
    </tr>    
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_CORRECT_TENDENCE;?></td>
      <td align="left"><input type="text" name="tip_points_correct_tendence" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_tendence;?>"</td>
      <td align="left"><input type="text" name="tip_points_correct_tendence_joker" size="5" class="inputbox" value="<?php echo $proj->tip_points_correct_tendence_joker;?>" <?php if ($proj->tip_joker == 0) echo 'DISABLED ' ?>/</td>
    </tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_WRONG_TIP;?></td>
      <td align="left"><input type="text" name="tip_points_tip" size="5" class="inputbox" value="<?php echo $proj->tip_points_tip;?>"</td>
      <td align="left"><input type="text" name="tip_points_tip_joker" size="5" class="inputbox" value="<?php echo $proj->tip_points_tip_joker;?>" <?php if ($proj->tip_joker == 0) echo 'DISABLED ' ?>/</td>
    </tr>
<script language="javascript" type="text/javascript">
    function FormSwitchJokerLimit(action) {
		document.adminForm.tip_joker_limit.disabled=action;
    }
</script>    
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_JOKER_LIMIT_SELECT;?></td>
	    <td><input type="radio" name="tip_joker_limit_select" id="tip_joker_limit_select0" value="0" <?php if ($proj->tip_joker_limit==0) echo 'checked="checked"' ?>  onclick="javascript:FormSwitchJokerLimit(true)" >
			<label for="tip_joker_limit_select0"><?php echo _CMN_NO ?></label>
			<input type="radio" name="tip_joker_limit_select" id="tip_joker_limit_select1" value="1" <?php if ($proj->tip_joker_limit>0) echo 'checked="checked"' ?> onclick="javascript:FormSwitchJokerLimit(false)" />
			<label for="tip_joker_limit_select1"><?php echo _CMN_YES ?></label>
    	</td>
  	</tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_JOKER_LIMIT;?></td>
      <td align="left"><input type="text" name="tip_joker_limit" size="5" class="inputbox" value="<?php echo $proj->tip_joker_limit;?>" <?php if ($proj->tip_joker_limit == 0) echo 'DISABLED ' ?>/</td>
    </tr>    
<script language="javascript" type="text/javascript">
    function FormSwitchChamptip(action) {
		document.adminForm.tip_points_tip_champ.disabled=action;
    }
</script>    
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_CHAMP;?></td>
	    <td><input type="radio" name="tip_champ" id="tip_champ0" value="0" <?php if ($proj->tip_champ==0) echo 'checked="checked"' ?>  onclick="javascript:FormSwitchChamptip(true)" >
			<label for="tip_champ0"><?php echo _CMN_NO ?></label>
			<input type="radio" name="tip_champ" id="tip_champ1" value="1" <?php if ($proj->tip_champ==1) echo 'checked="checked"' ?> onclick="javascript:FormSwitchChamptip(false)" />
			<label for="tip_champ1"><?php echo _CMN_YES ?></label>
    	</td>
  	</tr>
    <tr>
      <td width="50%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TIP_CHAMP_POINTS;?></td>
      <td align="left"><input type="text" name="tip_points_tip_champ" size="5" class="inputbox" value="<?php echo $proj->tip_points_tip_champ;?>" <?php if ($proj->tip_champ == 0) echo 'DISABLED ' ?>/</td>
    </tr>    
  </table>
				</div>
<!-- Content 5 END -->

<!-- Info 5 START -->				
				<div class="install-body">
    			<div class="t">
            <div class="t">

              <div class="t"></div>
            </div>
          </div>
          <div class="m">
						<fieldset>
							<table class="content">
							<tr><td><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_HINT5;?>
								</td>
							</tr>
							</table>
						</fieldset>
					</div>
          <div class="b">
            <div class="b">
              <div class="b"></div>
            </div>
          </div>
					<div class="clr"></div>
				</div>
<!-- Info 5 END -->
	
        <div class="clr"></div>
      </div>
      <div class="b">
        <div class="b">
          <div class="b"></div>
        </div>
      </div>
		</div>
	</div>
</div>
<div class="clr"></div>
<input type="hidden" name="id" value="<?php echo $proj->id; ?>">
<input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="act" value="<?php echo $act;?>">
<input type="hidden" name="task" value="">
<?php if ($old_id) { ?><input type="hidden" name="old_id" value="<?php echo $old_id;?>"><?php } ?>
</form>
